$(".getSetSkuVal").on("click", function () {
    $("tr[class*='sku_table_tr']").each(function () {
        var propids = $(this).attr("propids");
        var propvalids = $(this).attr("propvalids");
    });
});

//批量设置
$("#batchSet").click(function () {

    var alreadySetSkuVals = {};
    $("tr[class*='sku_table_tr']").each(function () {
        var productStock = $(this).find("input[type='text'][class*='setting_sku_product_stock']").val();
        var supplyPrice = $(this).find("input[type='text'][class*='setting_sku_supply_price']").val();
        var marketPrice = $(this).find("input[type='text'][class*='setting_sku_market_price']").val();
        var productPrice = $(this).find("input[type='text'][class*='setting_sku_product_price']").val();
        var productWeight = $(this).find("input[type='text'][class*='setting_sku_product_weight']").val();
        var productVolume = $(this).find("input[type='text'][class*='setting_sku_product_volume']").val();
        if (productStock || supplyPrice || marketPrice || productPrice || productWeight || productVolume) {
            alreadySetSkuVals = {
                "productStock": productStock,
                "supplyPrice": supplyPrice,
                "marketPrice": marketPrice,
                "productPrice": productPrice,
                "productWeight": productWeight,
                "productVolume": productVolume
            }
        }
    });

    if (alreadySetSkuVals){
        for (let i = 0; i < $("input[name=productStock]").length; i++) {
            $("input[name=productStock]")[i].value = alreadySetSkuVals.productStock;
            $("input[name=supplyPrice]")[i].value = alreadySetSkuVals.supplyPrice;
            $("input[name=marketPrice]")[i].value = alreadySetSkuVals.marketPrice;
            $("input[name=productPrice]")[i].value = alreadySetSkuVals.productPrice;
            $("input[name=productWeight]")[i].value = alreadySetSkuVals.productWeight;
            $("input[name=productVolume]")[i].value = alreadySetSkuVals.productVolume;
        }
    }

});

